﻿using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.Events;


public class UIGroupTab : UIBaseTab
{
    public Action<GameObject, bool> onRefreshCell;
    private void Start()
    {
        this.Init();
    }

    public void SetInteractable(bool interactable)
    {
        var buttons = this.GetComponentsInChildren<Button>(true);
        foreach (var button in buttons)
        {
            button.interactable = interactable;
        }

    }

    protected override void UpdateTabState(GameObject obj, bool isSelected)
    {
        onRefreshCell?.Invoke(obj, isSelected);
    }
}